home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 401-425 / disk_416 / quantizer / flclq.doc < prev    next >
Text File  |  1992-05-06  |  7KB  |  202 lines

  1. *******************************************************************************
  2.  
  3.                    FLCLQ Color Quantizer for the AMIGA v1.0
  4.  
  5. *******************************************************************************
  6.  
  7.       Copyright 1990, Christophe LABOUISSE & Frederic LOUGUET
  8.  
  9.                           ALL RIGHTS RESERVED
  10.  
  11.  
  12.  
  13. Distribution:
  14.     This program is available to the public as SHAREWARE, therefore, its
  15.     distribution is encouraged, provided no profit is made, excluding
  16.     nominal costs for copying and handling.
  17.  
  18.  
  19. Usage Rights:
  20.     Anyone is free to use this program for a period of time, not to exceed
  21.     30 days, for the purpose of evaluation. After such a time, usage rights
  22.     are revoked pending registration and a small fee of a few dollars to the
  23.     authors.
  24.  
  25.  
  26. Well, it's up to you. Give us some money to write the next version, between
  27. 20 $ and 1.000.000.000.000.000.000.000.000.000.000.000.000.000 $ !
  28.  
  29. Write to us, send us images, give us informations on other shareware, public
  30. domain or commercial products which do the same job better (if any).
  31.  
  32. If we become VERY RICH (ah!ah!), we will write a VERY optimized version.
  33. We already know how to do that with Octree Quantization. If we don't become
  34. very rich, we will MAYBE write this optimized version.
  35.  
  36. Thank you for your support.
  37.  
  38.  
  39.  
  40. Addresses:    Christophe LABOUISSE      Frederic LOUGUET
  41.               67 rue de Wissous         2 rue des Amandiers, Les Tilleuls
  42.               91320 Wissous             91800 Boussy St Antoine
  43.               FRANCE                    FRANCE
  44.  
  45.  
  46. ********************************************************************************
  47.  
  48.  
  49.  
  50.  
  51. FLCLQ is a Color Quantizer. It converts 24 bits true color images into
  52. 256 or less colors images. It uses a fairly sophisticated algorithm, mixing
  53. Median-Cut, Popularity method and a "house-made" algorithm.
  54.  
  55. FLCLQ runs on any Amiga with 68x00 processor and use Motorola Fast Floating
  56. Point routines.
  57.  
  58. FLCLQ020 runs on any accelerated Amiga with a 68020/881 or 68030/882
  59. combination. A coprocessor is REQUIRED, since FLCLQ020 uses inline floating
  60. point instructions (-f8d Lattice parameter).
  61.  
  62. FLCLQ has been written with Lattice C 5.05.
  63.  
  64.  
  65.  
  66. We provide four sample images :
  67.  
  68. BALL32IL.lbm is a 320x200x32 colors image converted by the commercial pro-
  69. duct ImageLink from Active Circuits. This is a great product,
  70. but their Quantizer is not the best part of the program...
  71.  
  72. BALL32FL.lbm is the same image converted by FLCLQ. Isn't it better ?
  73.  
  74. These two images can be displayed on a standard Amiga.
  75.  
  76.  
  77. The next two images are VGA 320x200x256 colors. They can be displayed on
  78. any PC-XT/AT/386/486 with a VGA board.
  79.  
  80. BALLILDI is converted with ImageLink with Floyd-Steinberg dithering.
  81.  
  82. BALLFLDI is converted with FLCLQ with our own dithering.
  83.  
  84. As you can see, the difference is much more noticeable than with the 32
  85. colors images. The original image was calculated with Sculpt-Animate 4D
  86. in 320x200 pixels and RGB format.
  87.  
  88.  
  89.  
  90. The syntax of FLCLQ is described when you run the program without parameter.
  91. It accepts as input 24 bits RGB files from Sculpt-Animate (Raw format, one
  92. red file (.r or .red), one green file (.g or .grn) and one blue file
  93. (.b or .blu)).
  94.  
  95. It outputs a file in IFF ILBM or RIX VGA PAINT format or simply converts
  96. in one RGB file to display the image on the Hercules Graphics Station Card.
  97. In this case, the image must be 512x480 pixels, calculated with a 13/10
  98. ratio in SA-4D and displayed with the demo program shipped with the HGSC.
  99.  
  100.  
  101. Other parameters :
  102.  
  103. -g : Outputs gray levels. It speaks for itself.
  104.  
  105. -d : Dithering. The conversion takes longer but is better if it is activated
  106.  
  107. -b : bitplanes for output. 8 means 256 colors, 6 64 colors, 5 32 colors, etc
  108.  
  109. -c : bits per RGB component. 4 means a 4096 colors palette or 12
  110. bits per pixel = AMIGA), 6 means a 262144 colors palette or 18 bits
  111. per pixel = VGA), and 8 means a 16777216 colors palette or 24 bits
  112. per pixel = MAC II).
  113.  
  114. -p : Popularity significativity level. 15000 by default, it represents the
  115. level at which some pixels are processed by a variation of the popularity
  116. algorithm. It helps to give better results than with a simple Median-Cut.
  117.  
  118. -w : Image width. It is difficult to understand, isn't it ?
  119.  
  120. -h : Image height. It is even more difficult...
  121.  
  122. -O : Name of the converted image. It is TOO difficult to explain.
  123.  
  124.  
  125. Now, here is two exemples :
  126.  
  127. 1) You want to convert the 24 bits Sculpt-RGB image BALL which consists
  128. of the three files BALL.RED, BALL.GRN and BALL.BLU in a 32 colors IFF
  129. image displayable on the Amiga, with no dithering. Here is the syntax :
  130.  
  131. FLCLQ -eS -si -b5 -c4 -w320 -h200 -O <VOL>:BALL32FL.lbm <VOL>:BALL
  132.  
  133. -eS for .red, .grn, .blu extensions
  134. -si for iff output
  135. -b5 for 32 colors
  136. -c4 for 4096 colors palette (16 levels of RGB)
  137. -w320, -h200 for the resolution
  138. -O <name of the final image>
  139. and then the name of RGB files ("BALL").
  140.  
  141. Then you get the BALL32FL.lbm exemple. The extension ".lbm" is not required.
  142.  
  143.  
  144.  
  145. Now you want to convert it into a 256 colors VGA, with dithering :
  146.  
  147. FLCLQ -eS -si -b8 -c6 -w320 -h200 -O <VOL>:BALLFLDI.lbm <VOL>:BALL
  148.  
  149. -b8 for 256 colors
  150. -c6 for 262144 colors VGA palette (64 levels of RGB)
  151.  
  152. The extension ".lbm" is useful here, because you can directly load the image
  153. into DeLuxe Paint II Enhanced PC to modify it if you want to.
  154.  
  155. --------------------------------------------------------------------------
  156.  
  157. FLCLQ uses B-trees and dynamic memory allocation. It is not very fast,
  158. especially when the resolution and the size of the palette is getting
  159. big. It has been tested up to 1024x768 resolution.
  160.  
  161. Here are some benchmarks :
  162.  
  163.  
  164. BALL Conversion        FLCLQ 68000            FLCLQ/020
  165. ---------------        Amiga 2000 - 3 Mo      GVP 68030/882-28 Mhz
  166.  
  167. To 32 colors           1 minute 33 seconds    11.4 seconds
  168. Palette 4096
  169. No dithering
  170.  
  171. To 256 colors
  172. Palette 262144        21 minutes 03 seconds  2 minutes 18 seconds
  173. Dithering
  174.  
  175.  
  176. As you can see, you can expect a 8 to 9 times acceleration with a 68030
  177. over a standard Amiga.
  178.  
  179. ---------------------------------------------------------------------------
  180.  
  181. We already know how to optimize all this. OCTREE QUANTIZATION is the key.
  182. It would be MUCH faster than the current version and would knocks the doors
  183. off the competition. (hugh, well said). The Read/Write routines need to be
  184. optimized, too.
  185.  
  186. However, it requires a lot of work. We will do this work if you ask us to,
  187. and if you give us just a little time and money to.
  188.  
  189. Here again are our addresses. Long live the Amiga AND the big PCs.
  190.  
  191.  
  192. AND REMEMBER : FLCLQ will give its best results when converting 24 bits RGB
  193. to 256 colors VGA images.
  194.  
  195.  
  196.  
  197.           Christophe LABOUISSE      Frederic LOUGUET
  198.           67 rue de Wissous         2 rue des Amandiers, Les Tilleuls
  199.           91320 Wissous             91800 Boussy St Antoine
  200.           FRANCE                    FRANCE
  201.  
  202.